/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package View;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class SearchPanel extends JPanel{
    
    private JTextField search_text_field;
    private JButton search_button;
    private JComboBox search_option;
    private JPanel results_panel;
    
    public SearchPanel(){
        init();
        this.setVisible(true);
    }
    
    public void init(){
        setSearch_button(new JButton("SEARCH"));
        setSearch_text_field(new JTextField());
        setSearch_option(new JComboBox(new DefaultComboBoxModel(new String[] { "Search by..", "Veterinarian", "Pet", "Owner" , "SSN", "Name"})));
        setResults_panel(new JPanel());
        setLayout(new BorderLayout());
        add(getResults_panel(), BorderLayout.CENTER);
        JPanel aux = new JPanel();
        aux.setLayout(new BorderLayout());
        aux.add(new JLabel("Search Tool"), BorderLayout.NORTH);
        aux.add(getSearch_text_field(),BorderLayout.CENTER);
        JPanel aux2 = new JPanel();
        aux2.setLayout(new BorderLayout());
        aux2.add(getSearch_button(),BorderLayout.LINE_END);
        aux2.add(getSearch_option(),BorderLayout.LINE_START);
        aux.add(aux2, BorderLayout.SOUTH);
        add(aux, BorderLayout.NORTH);
        
    }

    public JTextField getSearch_text_field() {
        return search_text_field;
    }

    public void setSearch_text_field(JTextField search_text_field) {
        this.search_text_field = search_text_field;
    }

    public JButton getSearch_button() {
        return search_button;
    }

    public void setSearch_button(JButton search_button) {
        this.search_button = search_button;
    }

    public JComboBox getSearch_option() {
        return search_option;
    }

    public void setSearch_option(JComboBox search_option) {
        this.search_option = search_option;
    }

    public JPanel getResults_panel() {
        return results_panel;
    }

    public void setResults_panel(JPanel results_panel) {
        this.results_panel = results_panel;
    }
}
